package org.misty.seckill.service;

import org.misty.seckill.model.User;
import org.misty.seckill.vo.LoginVo;

public interface LoginService {
  LoginVo login(LoginVo vo);

  User getByToken(String token);

  boolean keepAlive(String token, User user);

  /**
   * @param token
   * @param url
   * @return token
   */
  String cacheRedirect(String token, String url);

  /**
   * 清除redirect缓存
   *
   * @param token
   * @return true if success
   */
  boolean clearRedirect(String token);

  String getRedirectByToken(String token);
}
